Update index.jsx#13
Conversation
Save the subscriptions based on only the name of the subscription. So you don't save multiple subscriptions of the same name.
|
With this, it isn't possible to have multiple subscriptions to the same publication in the same component. I think it's better to wrap the |
|
Great idea @maxnowack, that would remove the need to track the subscriptions on each component, and reduce the load on GC too. So the implementation would rather be: this.autorun(() => this.__subscribe.apply(this, [name, ...options]))Rather than the current lookup and removal. What do you think @Elviron ? |
|
@timbrandin I don't think that it is a good idea to wrap every PS: I don't get why you stringify the arguments of the subscriptions to store the reference. Is there a reason for this? |
Save the subscriptions based on only the name of the subscription.
So you don't save multiple subscriptions of the same name.